package com.foreknow.elm.service.impl;

import com.foreknow.elm.dao.OrderdetailetDao;
import com.foreknow.elm.dao.impl.OrderdetailetDaoImpl;
import com.foreknow.elm.po.Orderdetailet;
import com.foreknow.elm.service.OrderdetailetService;
import com.foreknow.elm.util.DBUtil;

import java.util.List;

public class OrderdetailetServiceImpl implements OrderdetailetService {
    @Override
    public int saveOrderDetailet(List<Orderdetailet> list) {
        OrderdetailetDao orderdetailetDao = new OrderdetailetDaoImpl();
        int isRight = 0;
        try {
            DBUtil.getConnection();
            isRight = orderdetailetDao.saveOrderDetailet(list);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            DBUtil.close();
        }

        return isRight;
    }
}
